#!/usr/bin/env python

"""Library for capturing image from webcam.
"""

__version__ = "$Revision$"
# Last Modified on $Date$
# by $Author$
# from $Source$

from opencv import highgui

camera = highgui.cvCreateCameraCapture(0)

def capture_image(dest):
    """ Captures picture from webcam and stores it as a file specified in dest
    """
    im = highgui.cvQueryFrame(camera)
    highgui.cvSaveImage(dest, im)


